﻿using System;
using System.Collections.Generic;

using Layers;

using NLog;

namespace HoldemGame
{

    public interface IGameConn
    {
        Game Game { get; }
    }

    /// <summary>
    /// Represents state object connected to the game
    /// </summary>
    public class GameObject : IGameConn
    {
        private Game _game;
        public string ID;
        public const int PLAYER = 1;
        public const int BOARD = -1;
        public const int INVISIBLE = -2;

        public Game Game { get { return _game; } set { Game old = _game; _game = value; GameChanged(old); } }

        public GameObject(Game game)
        {
            _game = game;
            GameChanged(null);
        }

        public GameObject()
        {
        }

        protected virtual void GameChanged(Game oldGame)
        {

        }
    }


    public class GameRunner
    {
        public Game Game;


        public GameRunner(Game game)
        {
            Game = game;
        }

        public void Run()
        {
            while (Game.NextStep()) ;
        }
    }
}